package cn.kgm.makeGod.condition;

import cn.kgm.makeGod.Character;
import cn.kgm.makeGod.PersonalityTag;
import lombok.Data;

/**
 * @Version 1.8
 * @Author: Kappi
 * @Date: 2025-9-11 11:29
 * @Description: cn.kgm.makeGod.condition.PersonalityCondition
 */
@Data
public class PersonalityCondition implements Condition {

    private PersonalityTag tag;
    private Integer minIntensity;

    public PersonalityCondition() {
    }

    public PersonalityCondition(PersonalityTag tag, Integer minIntensity) {
        this.tag = tag;
        this.minIntensity = minIntensity;
    }

    @Override
    public boolean check(Character actor, Character target, WorldState world) {
        return actor.hasPersonality(tag, minIntensity != null ? minIntensity : 0);
    }

}
